﻿<%@ Page Title="Real Estate and Contracting - Savory Housing" Language="C#" MasterPageFile="~/RealState.master" AutoEventWireup="true" EnableEventValidation="false"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script src="Scripts/CascadingDropdown.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#<%=ddlCountry.ClientID%>').change(getState);
            $('#<%=ddlState.ClientID%>').change(getCity);
            $('#<%=ddlCity.ClientID%>').append(new Option('--Select State-- ', ' --Select City -- ', false));
            $('#<%=ddlState.ClientID%>').append(new Option('--Select State-- ', ' --Select State -- ', false));
            $(":input[title]").each(function () {
                $(this).val($(this).attr("title"));
                $(this).bind('focus', function () {
                    if ($(this).val() == $(this).attr("title")) $(this).val('');
                });
                $(this).bind('blur', function () {
                    if ($(this).val() == '') $(this).val($(this).attr("title"));
                });
            });

        });
        function getState() {
            $("select[id$=ddlState] > option").remove();
            $('#<%=ddlState.ClientID%>').append(new Option('--Select State-- ', ' --Select State -- ', false));
            $.ajax({
                type: "POST",
                url: "/CountryService.asmx/GetState",
                data: "{Country: '" + $('#MainContent_ddlCountry').val() + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (response) {
                    var models = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
                    for (var i = 0; i < models.length; i++) {
                        var val = models[i];
                        var text = models[i];
                        $('#MainContent_ddlState').append(new Option(text, val, false));
                    }

                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                }

            });
        }

        function getCity() {
            $("select[id$=ddlCity] > option").remove();
            $('#<%=ddlCity.ClientID%>').append(new Option('--Select State-- ', ' --Select City -- ', false));
            $.ajax({
                type: "POST",
                url: "/CountryService.asmx/GetCity",
                data: "{State: '" + $('#MainContent_ddlState').val() + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (response) {
                    var models = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
                    for (var i = 0; i < models.length; i++) {
                        var val = models[i];
                        var text = models[i];
                        $('#MainContent_ddlCity').append(new Option(text, val, false));
                    }

                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                }

            });
        }
        function OpenSignIn() {
            $('#divSignIn').hide("fast");
            $('#divNewRegister').show("fast");
            $('#divAlrdyRegister').show("fast");
        }

        function ForgetPassword() {
            $('#<%=btnSignIn.ClientID%>').attr('value', 'Submit');
            $('#<%=txtPassword.ClientID%>').hide("fast");
            $('#<%=chkRemember.ClientID%>').hide("fast");
            $('#lblKeepMeLogedIn').hide("fast");
            $('#lnkForgetPassword').hide("fast");
        }
        function MemberShipChecked(Obj) {

            if (Obj.id == 'MainContent_chkMemberShip') {
                $('#<%=chkMemberShip.ClientID %>').attr('checked', 'checked');
                $('#<%=chkNonMemberShip.ClientID %>').attr('checked', false);
            }
            else {
                $('#<%=chkNonMemberShip.ClientID %>').attr('checked', 'checked');
                $('#<%=chkMemberShip.ClientID %>').attr('checked', false);
            }
        }
        function divdirectSearchMenu1() {

            $('#divdirectSearchMenu1').css('display', 'block');
            $('#divSignIn').css('display', 'none');
        }
        function divdirectSearchMenu2() {

            $('#divdirectSearchMenu2').css('display', 'block');
            $('#divdirectSearchMenu1').css('display', 'none');
        }
        function divdirectSearchMenu3() {
            $('#divdirectSearchMenu3').css('display', 'block');
            $('#divdirectSearchMenu2').css('display', 'none');
            h3Search.innerHTML = $('#<%=ddlCountry.ClientID%>').val() + ' - ' + $('#<%=ddlState.ClientID%>').val() + ' - ' + $('#<%=ddlCity.ClientID%>').val();
            return false;
        }
</script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <!--Slider-->
    <div class="slider_container">
        <div class="slider_container_head">
            Featured Real Estate</div>
        <div id="gallery">
        <script type="text/javascript">

            stepcarousel.setup({
                galleryid: 'mygallery', //id of carousel DIV
                beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
                panelclass: 'panel', //class of panel DIVs each holding content
                autostep: { enable: false, moveby: 1, pause: 3000 },
                panelbehavior: { speed: 1000, wraparound: false, wrapbehavior: 'slide', persist: true },
                defaultbuttons: { enable: true, moveby: 5, leftnav: ['../images/leftnav.jpg', -4, 0], rightnav: ['../images/rightnav.jpg', 0, 0] },
                statusvars: ["startA", "startB", "total"],
                onslide: function () {
                    window.status = "Currently showing panels " + startA + " through " + startB
                }, //register 3 variables that contain current panel (start), current panel (last), and total panels
                contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
            })

</script>
            <div class="countdown">
                <a href="javascript:stepcarousel.stepBy('mygallery', -5)">
                    <img src="../images/gr-l_ar.jpg" alt="" border="0" align="top" /></a> &nbsp;
                Page <b><span id="startB"></span></b>of <b><span id="total"></span></b>&nbsp; <a
                    href="javascript:stepcarousel.stepBy('mygallery', 5)">
                    <img src="../images/gr-r_ar.jpg" alt="" border="0" align="top" /></a>
            </div>
            <div id="mygallery" class="stepcarousel">
                <div class="belt">
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img1.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>115 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img2.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img2.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img1.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="panel">
                        <div class="slider_boxes">
                            <div class="img">
                                <img src="../images/slider_img3.jpg" width="127" height="110" alt="" /></div>
                            <div class="slider_boxes_content">
                                <span class="blue"><strong>116 Snow DR, DM, SA</strong></span> <span class="green">$19,000
                                </span>
                                <br />
                                750 (m2) Building<br />
                                <span class="grey">3 Beds 2 Bath </span>
                                <br />
                                <span class="blue"><a href="#">Save Listing</a></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--Slider-->
    <div class="hm_links">
        <div id="divSignIn">
            <a id="directSearch" class="home_main_link white_db_box CLfont fleft" href="Menu.aspx"
                style="background: #fff;">Direct Search Menu</a>
                <% if (Session["UserID"].ToString() == "Guest")
                   {
                       Response.Write("<a class='home_main_link white_db_box CLfont fleft' style='background: #fff; cursor: pointer' href='Sign-In.aspx' >Sign In / Sign Up</a>");
                   }
                    %>
                    </div>
        <div id="divNewRegister" class="NewRegister" style="display: none">
            <h2>
                New Register</h2>
            <dl class="form clearfix">
                <dt>
                    <label>
                        <input id="chkMemberShip" type="checkbox" checked="checked" onclick="MemberShipChecked(this);"
                            name="member" runat="server" />
                        <span class="blue">Membership</span></label>
                    <br />
                    <label>
                        <input id="chkNonMemberShip" type="checkbox" onclick="MemberShipChecked(this);" name="member"
                            runat="server" />
                        <span class="blue">Without Membership</span></label>
                </dt>
                <dt><a href="#" class="lnk_purple">What is the Difference?</a></dt>
                <dt>
                    <div style="height: 62px;">
                    </div>
                    <input type="submit" class="reg-blue-round-btn w75" value="Sign Up" />
                </dt>
            </dl>
        </div>
        <div id="divAlrdyRegister" class="AlrdyRegister" style="display: none">
            <h2>
                Already Registered</h2>
            <dl class="form clearfix">
                <dt>
                    <asp:TextBox ID="txtUserName" CssClass="form-text" title="Email Address" MaxLength="100"
                        runat="server" />
                </dt>
                <dt>
                    <asp:TextBox ID="txtPassword" CssClass="form-text" runat="server" title="Password"
                        TextMode="Password" MaxLength="20" />
                </dt>
                <dt>
                    <input id="chkRemember" type="checkbox" checked="checked" runat="server" />
                    <span class="blue">
                        <label id="lblKeepMeLogedIn" for="remember">
                            Keep Me Loged In</label></span></dt>
                <dt><a id="lnkForgetPassword" href="#" class="lnk_purple" onclick="ForgetPassword();">
                    Forget Password</a></dt>
                <dt>
                    <br />
                    <asp:Button ID="btnSignIn" runat="server" CssClass="reg-blue-round-btn w75" Text="Sign In" />
                </dt>
            </dl>
        </div>
        <div id="divdirectSearchMenu">
            <div id="divdirectSearchMenu1" style="display: none">
                <h3 class="white_db_box CLfont" style="width: 295px;">
                    Menu</h3>
                <div class="clear">
                </div>
                <div class="blue">
                    <ul class="no_blullet">
                    <% if (Session["UserID"].ToString() != "Guest")
                       {
                           Response.Write("<li><a href='#' class='form-text_temp dark_gray' onclick='divdirectSearchMenu2();'>Membership Page</a></li>");
                       } %>
                        

                        <li><a href="#" class="form-text_temp dark_gray" onclick="divdirectSearchMenu2();">Real
                            Estate Search (By Country/City)</a></li>
                        <li style="display: none;"><a href="#" class="form-text_temp dark_gray" onclick="divdirectSearchMenu2();">
                            Saved Searches &amp; Contacts </a></li>
                        <li style="display: none;"><a href="#" class="form-text_temp dark_gray" onclick="divdirectSearchMenu2();">
                            Update Personal Information</a></li>
                    </ul>
                </div>
                <div class="clear">
                </div>
            </div>
            <div id="divdirectSearchMenu2" style="display: none">
                <h3 class="white_db_box nfont" style="width: 255px;">
                    Real Estate Search</h3>
                <div class="clear">
                </div>
                <br />
                <div class="pd-l10">
                    <div class="res_c1 purple">
                        Country:</div>
                    <div style="float: left; padding-right: 20px;">
                        <asp:DropDownList ID="ddlCountry" runat="server">
                        </asp:DropDownList>
                    </div>
                    <div style="float: left; padding-right: 20px;">
                        <asp:DropDownList ID="ddlState" runat="server">
                        </asp:DropDownList>
                    </div>
                    <div style="float: left; padding-right: 10px;">
                        <asp:DropDownList ID="ddlCity" runat="server">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                    <br />
                    <div style="margin: 0px 0px 0px 100px;">
                    <%--<a href="#" class="reg-blue-round-btn w75" onclick="divdirectSearchMenu3()">Search</a>--%>
                    <%--<input type="button" class="reg-blue-round-btn w75" value="Load" onclick="divdirectSearchMenu3()" />--%>
                        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClientClick="return divdirectSearchMenu3();"
                            CssClass="reg-blue-round-btn w75" />
                    </div>
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="clear">
    </div>
    </div>
</asp:Content>
